import java.util.Scanner;
/**
   Computes n! = 1 x 2 x ... (n - 1) x n, given n.
   We assume n is greater than zero and less than 12.

   Input: n, the integer value for which n! is to be computed.
   Output: n! -- the factorial of n
*/
public class Factorial
{
   public static void main(String[] args)
   {
      // Read value for n
      Scanner in = new Scanner(System.in);
      int n = in.nextInt();

      // your work here
      int factorial = 1;
      while(n > 1){
          factorial *= n;
          n--;
      }

      System.out.println(factorial);
   }
}